<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a>付费内容列表</a></li>
		</ul>

		<form class="well form-inline margin-top-20" method="post" action="{:url('Paidprogram/index')}">
			审核状态：
            <select class="form-control" name="status">
				<option value="">全部</option>
                <volist name="status" id="v">
                    <option value="{$key}" <if condition="input('request.status') neq '' && input('request.status') eq $key">selected</if>>{$v}</option>
                </volist>
			</select>
			
			时间：
			<input class="form-control js-bootstrap-date" name="start_time" id="start_time" autocomplete="off" value="{:input('request.start_time')}" aria-invalid="false" style="width: 110px;"> - 
            <input class="form-control js-bootstrap-date" name="end_time" id="end_time" autocomplete="off" value="{:input('request.end_time')}" aria-invalid="false" style="width: 110px;">
			用户： 
            <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
                   placeholder="请输入会员ID、靓号">
			
			<input type="submit" class="btn btn-primary" value="搜索">
			<a class="btn btn-danger" href="{:url('Paidprogram/index')}">清空</a>
		</form>

		<form method="post" class="js-ajax-form" action="">
					
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>ID</th>
						<th>用户信息</th>
						<th>标题</th>
						<th>封面</th>
						<th>简介</th>
						<th>分类</th>
						<th>价格</th>
						<th>类型</th>
						<th>视频列表</th>
						<th>审核状态</th>
						<th>购买数</th>
						<th>评价人数</th>
						<th>评价总分</th>
						<th>评价等级</th>
						<th>添加时间</th>
						<th>修改时间</th>
						<th align="center">{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="lists" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo['userinfo']['user_nickname']}({$vo['uid']})</td>
						<td>{$vo['title']}</td>
						<td><img src="{$vo['thumb']}" width="60" / class="imgtip"></td>
						<td>{$vo['content']}</td>
						<td>{$vo['classname']}({$vo['classid']})</td>
						<td>￥{$vo['money']}</td>
						<td>{$type[$vo['type']]}</td>
						<td>
							
							<div>
								<foreach name="$vo['video_arr']" id="vl">
									<if condition="$vo['type'] eq 1">
										<p>视频标题:{$vl['video_title']}</p>
									</if>
									<p>视频地址:{$vl['video_url']}<a href="javaScript:void(0)" class="view" data-url="{$vl['video_url']}">观看</a></p>
									<p>视频长度:{:getSeconds($vl['video_length'])}</p>
									<if condition="$vo['type'] eq 1">
										<if condition="$vl['is_see'] eq 1">
											<p>是否可试看:是</p>
										<else />
											<p>是否可试看:否</p>
										</if>
									</if>
									<hr>
								</foreach>
							</div>
						</td>
						<td>{$status[$vo['status']]}</td>
						<td>{$vo['sale_nums']}</td>
						<td>{$vo['evaluate_nums']}</td>
						<td>{$vo['evaluate_total']}</td>
						<td>{$vo['evaluate_point']}</td>
						<td>{:date('Y-m-d H:i',$vo['addtime'])}</td>
						<td><if condition="$vo['edittime'] gt 0">{:date('Y-m-d H:i',$vo['edittime'])}<else />--</if></td>
						<td>
                            <a class="btn btn-xs btn-primary" href='{:url("Paidprogram/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Paidprogram/del',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
		$(function(){
			Wind.use('layer');

			$('.view').click(function(){
                var _this=$(this);
                var url=_this.data('url');

                layer.open({
                    type: 2,
                    title: '查看视频',
                    shadeClose: true,
                    shade: 0.8,
                    area: ['500px', '600px'],
                    content: '/admin/Paidprogram/videoplay?url='+url
                }); 
                
            });
		});

		
	</script>
</body>
</html>